home *** CD-ROM | disk | FTP | other *** search
/ Champak 103 / Vol 103.iso / games / starship.swf / scripts / DefineSprite_150 / frame_1 / DoAction.as
Text File  |  2010-03-13  |  560b  |  36 lines

  1. function init()
  2. {
  3.    var i = 1;
  4.    while(_root.cst.maxMonster >= i)
  5.    {
  6.       tellTarget("../monster_" + i)
  7.       {
  8.          _root.temp.monsterFrames = _totalframes;
  9.       }
  10.       if(Number(_root.temp.monsterFrames) == 0)
  11.       {
  12.          _name = "monster_" + i;
  13.          break;
  14.       }
  15.       i++;
  16.    }
  17.    monster.gotoAndStop(1);
  18.    if(start ne "")
  19.    {
  20.       gotoAndPlay(start + 1);
  21.    }
  22.    else
  23.    {
  24.       gotoAndPlay(2);
  25.    }
  26. }
  27. function hit()
  28. {
  29.    if(ready == true)
  30.    {
  31.       monster.nextFrame();
  32.    }
  33. }
  34. init();
  35. play();
  36.